package com.ggb.smartstudy.mapper;

import com.ggb.smartstudy.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author gefangjie
 */
@Mapper
public interface UserRoleMapper {
    // 通过用户id获取用户角色id
    List<Integer> getRoleIdByUserId(@Param("userId") Integer userId);

    List<UserRole> getAllUserRoles();

    void insertUserRole(UserRole userRole);

    void deleteUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
}
